<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>ioctl VIDIOC_ENUMOUTPUT</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Video for Linux Two API Specification"
HREF="book1.htm"><LINK
REL="UP"
TITLE="Function Reference"
HREF="r7624.htm"><LINK
REL="PREVIOUS"
TITLE="ioctl VIDIOC_ENUMINPUT"
HREF="r8936.htm"><LINK
REL="NEXT"
TITLE="ioctl VIDIOC_ENUMSTD"
HREF="r9288.htm"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Video for Linux Two API Specification: Revision 0.24</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="r8936.htm"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="r9288.htm"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="VIDIOC-ENUMOUTPUT"
></A
>ioctl VIDIOC_ENUMOUTPUT</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN9153"
></A
><H2
>Name</H2
>VIDIOC_ENUMOUTPUT&nbsp;--&nbsp;Enumerate video outputs</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN9156"
></A
><H2
>Synopsis</H2
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN9157"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>int ioctl</CODE
>(int fd, int request, struct v4l2_output *argp);</CODE
></P
><P
></P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN9167"
></A
><H2
>Arguments</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><CODE
CLASS="PARAMETER"
>fd</CODE
></DT
><DD
><P
>File descriptor returned by <A
HREF="r14090.htm"
><CODE
CLASS="FUNCTION"
>open()</CODE
></A
>.</P
></DD
><DT
><CODE
CLASS="PARAMETER"
>request</CODE
></DT
><DD
><P
>VIDIOC_ENUMOUTPUT</P
></DD
><DT
><CODE
CLASS="PARAMETER"
>argp</CODE
></DT
><DD
><P
></P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN9187"
></A
><H2
>Description</H2
><P
>To query the attributes of a video outputs applications
initialize the <CODE
CLASS="STRUCTFIELD"
>index</CODE
> field of struct&nbsp;<A
HREF="r9149.htm#V4L2-OUTPUT"
>v4l2_output</A
>
and call the <CODE
CLASS="CONSTANT"
>VIDIOC_ENUMOUTPUT</CODE
> ioctl with a
pointer to this structure. Drivers fill the rest of the structure or
return an <SPAN
CLASS="ERRORCODE"
>EINVAL</SPAN
> error code when the index is out of bounds. To enumerate all
outputs applications shall begin at index zero, incrementing by one
until the driver returns <SPAN
CLASS="ERRORCODE"
>EINVAL</SPAN
>.</P
><DIV
CLASS="TABLE"
><A
NAME="V4L2-OUTPUT"
></A
><P
><B
>Table 1. struct <CODE
CLASS="STRUCTNAME"
>v4l2_output</CODE
></B
></P
><TABLE
BORDER="0"
FRAME="void"
WIDTH="100%"
CLASS="CALSTABLE"
><COL
WIDTH="25%"
TITLE="C1"><COL
WIDTH="25%"
TITLE="C2"><COL
WIDTH="50%"
TITLE="C3"><TBODY
VALIGN="TOP"
><TR
><TD
>__u32</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>index</CODE
></TD
><TD
>Identifies the output, set by the
application.</TD
></TR
><TR
><TD
>__u8</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>name</CODE
>[32]</TD
><TD
>Name of the video output, a NUL-terminated ASCII
string, for example: "Vout". This information is intended for the
user, preferably the connector label on the device itself.</TD
></TR
><TR
><TD
>__u32</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>type</CODE
></TD
><TD
>Type of the output, see <A
HREF="r9149.htm#OUTPUT-TYPE"
>Table 2</A
>.</TD
></TR
><TR
><TD
>__u32</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>audioset</CODE
></TD
><TD
><P
>Drivers can enumerate up to 32 video and
audio outputs. This field shows which audio outputs were
selectable as the current output if this was the currently selected
video output. It is a bit mask. The LSB corresponds to audio output 0,
the MSB to output 31. Any number of bits can be set, or
none.</P
><P
>When the driver does not enumerate audio outputs no
bits must be set. Applications shall not interpret this as lack of
audio support. Drivers may automatically select audio outputs without
enumerating them.</P
><P
>For details on audio outputs and how to
select the current output see <A
HREF="x341.htm"
>Section 1.5</A
>.</P
></TD
></TR
><TR
><TD
>__u32</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>modulator</CODE
></TD
><TD
>Output devices can have zero or more RF modulators.
When the <CODE
CLASS="STRUCTFIELD"
>type</CODE
> is
<CODE
CLASS="CONSTANT"
>V4L2_OUTPUT_TYPE_MODULATOR</CODE
> this is an RF
connector and this field identifies the modulator. It corresponds to
struct&nbsp;<A
HREF="r11430.htm#V4L2-MODULATOR"
>v4l2_modulator</A
> field <CODE
CLASS="STRUCTFIELD"
>index</CODE
>. For details
on modulators see <A
HREF="x394.htm"
>Section 1.6</A
>.</TD
></TR
><TR
><TD
><A
HREF="r9288.htm#V4L2-STD-ID"
>v4l2_std_id</A
></TD
><TD
><CODE
CLASS="STRUCTFIELD"
>std</CODE
></TD
><TD
>Every video output supports one or more different
video standards. This field is a set of all supported standards. For
details on video standards and how to switch see <A
HREF="x448.htm"
>Section 1.7</A
>.</TD
></TR
><TR
><TD
>__u32</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>reserved</CODE
>[4]</TD
><TD
>Reserved for future extensions. Drivers must set
the array to zero.</TD
></TR
></TBODY
></TABLE
></DIV
><DIV
CLASS="TABLE"
><A
NAME="OUTPUT-TYPE"
></A
><P
><B
>Table 2. Output Type</B
></P
><TABLE
BORDER="0"
FRAME="void"
WIDTH="100%"
CLASS="CALSTABLE"
><COL
WIDTH="38%"
TITLE="C1"><COL
WIDTH="12%"
TITLE="C2"><COL
WIDTH="50%"
TITLE="C3"><TBODY
VALIGN="TOP"
><TR
><TD
><CODE
CLASS="CONSTANT"
>V4L2_OUTPUT_TYPE_MODULATOR</CODE
></TD
><TD
>1</TD
><TD
>This output is an analog TV modulator.</TD
></TR
><TR
><TD
><CODE
CLASS="CONSTANT"
>V4L2_OUTPUT_TYPE_ANALOG</CODE
></TD
><TD
>2</TD
><TD
>Analog baseband output, for example Composite /
CVBS, S-Video, RGB.</TD
></TR
><TR
><TD
><CODE
CLASS="CONSTANT"
>V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY</CODE
></TD
><TD
>3</TD
><TD
>[?]</TD
></TR
></TBODY
></TABLE
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN9274"
></A
><H2
>Return Value</H2
><P
>On success <SPAN
CLASS="RETURNVALUE"
>0</SPAN
> is returned, on error <SPAN
CLASS="RETURNVALUE"
>-1</SPAN
> and the <CODE
CLASS="VARNAME"
>errno</CODE
> variable is set appropriately:</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><SPAN
CLASS="ERRORCODE"
>EINVAL</SPAN
></DT
><DD
><P
>The struct&nbsp;<A
HREF="r9149.htm#V4L2-OUTPUT"
>v4l2_output</A
> <CODE
CLASS="STRUCTFIELD"
>index</CODE
>
is out of bounds.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="r8936.htm"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.htm"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="r9288.htm"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>ioctl VIDIOC_ENUMINPUT</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="r7624.htm"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>ioctl VIDIOC_ENUMSTD</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>
